export const Globals = Object.freeze({

  /**
   * 判断打开网站的设备是PC还是移动设备
   * 返回true就是，false就不是
   */
  isMobile() {
    const userAgentInfo = navigator.userAgent;
    const mobileAgents = ['Android', 'iPhone', 'iPad', 'iPod', 'Silk', 'BlackBerry', 'Opera Mini', 'IEMobile'];
    let flag = false;
    //根据userAgent判断是否是手机
    for (let v = 0; v < mobileAgents.length; v++) {
      if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
        flag = true;
        break;
      }
    }
    return flag;
  },


});
